// pages/hello/hello.js
Page({

  /**
   * Page initial data
   */
  data: {
    poetries: [{
        name: "Name 1",
        content: "Content 1"
      },
      {
        name: "Name 2",
        content: "Content 2"
      },
      {
        name: "Name 3",
        content: "Content 3"
      }
    ]
  },

  clickMeButton_bindtap: function () {
    this.setData({
      result: "Hello World!"
    });
  },

  slider_bindchanging: function (event) {
    this.setData({
      sliderValue: event.detail.value
    });
  },

  poetry_bindtap: function (event) {
    wx.showModal({
      content: this.data.poetries[event.currentTarget.dataset.poetryindex].name
    })
  },

  // 还有亿点需要注意的问题

  /**
   * Lifecycle function--Called when page load
   */
  onLoad: function (options) {

  },

  /**
   * Lifecycle function--Called when page is initially rendered
   */
  onReady: function () {

  },

  /**
   * Lifecycle function--Called when page show
   */
  onShow: function () {

  },

  /**
   * Lifecycle function--Called when page hide
   */
  onHide: function () {

  },

  /**
   * Lifecycle function--Called when page unload
   */
  onUnload: function () {

  },

  /**
   * Page event handler function--Called when user drop down
   */
  onPullDownRefresh: function () {

  },

  /**
   * Called when page reach bottom
   */
  onReachBottom: function () {

  },

  /**
   * Called when user click on the top right corner to share
   */
  onShareAppMessage: function () {

  }
})